﻿using System.Linq;

namespace Citi.ReportManager.WebUi.Models
{
    public class CurrentFolderModel
    {
        public CurrentFolderModel(string folder)
        {
            if (folder == null) return;

            Name = folder.Split(new[] { '\\' }).Last();
            Path = folder;
            PreviousFolder = folder.Replace(string.Format(@"\{0}", Name), string.Empty).Replace(Name, string.Empty);
        }

        public string Name { get; set; }
        public string Path { get; set; }
        public string PreviousFolder { get; set; }
    }    
}